using System;
using System.Collections.Generic;
using Android.Runtime;

namespace Com.Iflytek.Speech {

	[Register ("com/iflytek/speech/VerifierListener", "", "Com.Iflytek.Speech.IVerifierListenerInvoker")]
	public partial interface IVerifierListener : IJavaObject {

		[Register ("onBeginOfSpeech", "()V", "GetOnBeginOfSpeechHandler:Com.Iflytek.Speech.IVerifierListenerInvoker, IFlyBinding")]
		void OnBeginOfSpeech ();

		[Register ("onCancel", "()V", "GetOnCancelHandler:Com.Iflytek.Speech.IVerifierListenerInvoker, IFlyBinding")]
		void OnCancel ();

		[Register ("onEnd", "(Lcom/iflytek/speech/VerifierResult;I)V", "GetOnEnd_Lcom_iflytek_speech_VerifierResult_IHandler:Com.Iflytek.Speech.IVerifierListenerInvoker, IFlyBinding")]
		void OnEnd (global::Com.Iflytek.Speech.VerifierResult p0, int p1);

		[Register ("onEndOfSpeech", "()V", "GetOnEndOfSpeechHandler:Com.Iflytek.Speech.IVerifierListenerInvoker, IFlyBinding")]
		void OnEndOfSpeech ();

		[Register ("onRegister", "(Lcom/iflytek/speech/VerifierResult;)V", "GetOnRegister_Lcom_iflytek_speech_VerifierResult_Handler:Com.Iflytek.Speech.IVerifierListenerInvoker, IFlyBinding")]
		void OnRegister (global::Com.Iflytek.Speech.VerifierResult p0);

		[Register ("onVolumeChanged", "(I)V", "GetOnVolumeChanged_IHandler:Com.Iflytek.Speech.IVerifierListenerInvoker, IFlyBinding")]
		void OnVolumeChanged (int paramV);

	}

	[global::Android.Runtime.Register ("com/iflytek/speech/VerifierListener", DoNotGenerateAcw=true)]
	internal class IVerifierListenerInvoker : global::Java.Lang.Object, IVerifierListener {

		static IntPtr java_class_ref = JNIEnv.FindClass ("com/iflytek/speech/VerifierListener");
		IntPtr class_ref;

		public static IVerifierListener GetObject (IntPtr handle, JniHandleOwnership transfer)
		{
			return global::Java.Lang.Object.GetObject<IVerifierListener> (handle, transfer);
		}

		static IntPtr Validate (IntPtr handle)
		{
			if (!JNIEnv.IsInstanceOf (handle, java_class_ref))
				throw new InvalidCastException (string.Format ("Unable to convert instance of type '{0}' to type '{1}'.",
							JNIEnv.GetClassNameFromInstance (handle), "com.iflytek.speech.VerifierListener"));
			return handle;
		}

		protected override void Dispose (bool disposing)
		{
			if (this.class_ref != IntPtr.Zero)
				JNIEnv.DeleteGlobalRef (this.class_ref);
			this.class_ref = IntPtr.Zero;
			base.Dispose (disposing);
		}

		public IVerifierListenerInvoker (IntPtr handle, JniHandleOwnership transfer) : base (Validate (handle), transfer)
		{
			IntPtr local_ref = JNIEnv.GetObjectClass (Handle);
			this.class_ref = JNIEnv.NewGlobalRef (local_ref);
			JNIEnv.DeleteLocalRef (local_ref);
		}

		protected override IntPtr ThresholdClass {
			get { return class_ref; }
		}

		protected override System.Type ThresholdType {
			get { return typeof (IVerifierListenerInvoker); }
		}

		static Delegate cb_onBeginOfSpeech;
#pragma warning disable 0169
		static Delegate GetOnBeginOfSpeechHandler ()
		{
			if (cb_onBeginOfSpeech == null)
				cb_onBeginOfSpeech = JNINativeWrapper.CreateDelegate ((Action<IntPtr, IntPtr>) n_OnBeginOfSpeech);
			return cb_onBeginOfSpeech;
		}

		static void n_OnBeginOfSpeech (IntPtr jnienv, IntPtr native__this)
		{
			global::Com.Iflytek.Speech.IVerifierListener __this = global::Java.Lang.Object.GetObject<global::Com.Iflytek.Speech.IVerifierListener> (native__this, JniHandleOwnership.DoNotTransfer);
			__this.OnBeginOfSpeech ();
		}
#pragma warning restore 0169

		IntPtr id_onBeginOfSpeech;
		public void OnBeginOfSpeech ()
		{
			if (id_onBeginOfSpeech == IntPtr.Zero)
				id_onBeginOfSpeech = JNIEnv.GetMethodID (class_ref, "onBeginOfSpeech", "()V");
			JNIEnv.CallVoidMethod (Handle, id_onBeginOfSpeech);
		}

		static Delegate cb_onCancel;
#pragma warning disable 0169
		static Delegate GetOnCancelHandler ()
		{
			if (cb_onCancel == null)
				cb_onCancel = JNINativeWrapper.CreateDelegate ((Action<IntPtr, IntPtr>) n_OnCancel);
			return cb_onCancel;
		}

		static void n_OnCancel (IntPtr jnienv, IntPtr native__this)
		{
			global::Com.Iflytek.Speech.IVerifierListener __this = global::Java.Lang.Object.GetObject<global::Com.Iflytek.Speech.IVerifierListener> (native__this, JniHandleOwnership.DoNotTransfer);
			__this.OnCancel ();
		}
#pragma warning restore 0169

		IntPtr id_onCancel;
		public void OnCancel ()
		{
			if (id_onCancel == IntPtr.Zero)
				id_onCancel = JNIEnv.GetMethodID (class_ref, "onCancel", "()V");
			JNIEnv.CallVoidMethod (Handle, id_onCancel);
		}

		static Delegate cb_onEnd_Lcom_iflytek_speech_VerifierResult_I;
#pragma warning disable 0169
		static Delegate GetOnEnd_Lcom_iflytek_speech_VerifierResult_IHandler ()
		{
			if (cb_onEnd_Lcom_iflytek_speech_VerifierResult_I == null)
				cb_onEnd_Lcom_iflytek_speech_VerifierResult_I = JNINativeWrapper.CreateDelegate ((Action<IntPtr, IntPtr, IntPtr, int>) n_OnEnd_Lcom_iflytek_speech_VerifierResult_I);
			return cb_onEnd_Lcom_iflytek_speech_VerifierResult_I;
		}

		static void n_OnEnd_Lcom_iflytek_speech_VerifierResult_I (IntPtr jnienv, IntPtr native__this, IntPtr native_p0, int p1)
		{
			global::Com.Iflytek.Speech.IVerifierListener __this = global::Java.Lang.Object.GetObject<global::Com.Iflytek.Speech.IVerifierListener> (native__this, JniHandleOwnership.DoNotTransfer);
			global::Com.Iflytek.Speech.VerifierResult p0 = global::Java.Lang.Object.GetObject<global::Com.Iflytek.Speech.VerifierResult> (native_p0, JniHandleOwnership.DoNotTransfer);
			__this.OnEnd (p0, p1);
		}
#pragma warning restore 0169

		IntPtr id_onEnd_Lcom_iflytek_speech_VerifierResult_I;
		public void OnEnd (global::Com.Iflytek.Speech.VerifierResult p0, int p1)
		{
			if (id_onEnd_Lcom_iflytek_speech_VerifierResult_I == IntPtr.Zero)
				id_onEnd_Lcom_iflytek_speech_VerifierResult_I = JNIEnv.GetMethodID (class_ref, "onEnd", "(Lcom/iflytek/speech/VerifierResult;I)V");
			JNIEnv.CallVoidMethod (Handle, id_onEnd_Lcom_iflytek_speech_VerifierResult_I, new JValue (p0), new JValue (p1));
		}

		static Delegate cb_onEndOfSpeech;
#pragma warning disable 0169
		static Delegate GetOnEndOfSpeechHandler ()
		{
			if (cb_onEndOfSpeech == null)
				cb_onEndOfSpeech = JNINativeWrapper.CreateDelegate ((Action<IntPtr, IntPtr>) n_OnEndOfSpeech);
			return cb_onEndOfSpeech;
		}

		static void n_OnEndOfSpeech (IntPtr jnienv, IntPtr native__this)
		{
			global::Com.Iflytek.Speech.IVerifierListener __this = global::Java.Lang.Object.GetObject<global::Com.Iflytek.Speech.IVerifierListener> (native__this, JniHandleOwnership.DoNotTransfer);
			__this.OnEndOfSpeech ();
		}
#pragma warning restore 0169

		IntPtr id_onEndOfSpeech;
		public void OnEndOfSpeech ()
		{
			if (id_onEndOfSpeech == IntPtr.Zero)
				id_onEndOfSpeech = JNIEnv.GetMethodID (class_ref, "onEndOfSpeech", "()V");
			JNIEnv.CallVoidMethod (Handle, id_onEndOfSpeech);
		}

		static Delegate cb_onRegister_Lcom_iflytek_speech_VerifierResult_;
#pragma warning disable 0169
		static Delegate GetOnRegister_Lcom_iflytek_speech_VerifierResult_Handler ()
		{
			if (cb_onRegister_Lcom_iflytek_speech_VerifierResult_ == null)
				cb_onRegister_Lcom_iflytek_speech_VerifierResult_ = JNINativeWrapper.CreateDelegate ((Action<IntPtr, IntPtr, IntPtr>) n_OnRegister_Lcom_iflytek_speech_VerifierResult_);
			return cb_onRegister_Lcom_iflytek_speech_VerifierResult_;
		}

		static void n_OnRegister_Lcom_iflytek_speech_VerifierResult_ (IntPtr jnienv, IntPtr native__this, IntPtr native_p0)
		{
			global::Com.Iflytek.Speech.IVerifierListener __this = global::Java.Lang.Object.GetObject<global::Com.Iflytek.Speech.IVerifierListener> (native__this, JniHandleOwnership.DoNotTransfer);
			global::Com.Iflytek.Speech.VerifierResult p0 = global::Java.Lang.Object.GetObject<global::Com.Iflytek.Speech.VerifierResult> (native_p0, JniHandleOwnership.DoNotTransfer);
			__this.OnRegister (p0);
		}
#pragma warning restore 0169

		IntPtr id_onRegister_Lcom_iflytek_speech_VerifierResult_;
		public void OnRegister (global::Com.Iflytek.Speech.VerifierResult p0)
		{
			if (id_onRegister_Lcom_iflytek_speech_VerifierResult_ == IntPtr.Zero)
				id_onRegister_Lcom_iflytek_speech_VerifierResult_ = JNIEnv.GetMethodID (class_ref, "onRegister", "(Lcom/iflytek/speech/VerifierResult;)V");
			JNIEnv.CallVoidMethod (Handle, id_onRegister_Lcom_iflytek_speech_VerifierResult_, new JValue (p0));
		}

		static Delegate cb_onVolumeChanged_I;
#pragma warning disable 0169
		static Delegate GetOnVolumeChanged_IHandler ()
		{
			if (cb_onVolumeChanged_I == null)
				cb_onVolumeChanged_I = JNINativeWrapper.CreateDelegate ((Action<IntPtr, IntPtr, int>) n_OnVolumeChanged_I);
			return cb_onVolumeChanged_I;
		}

		static void n_OnVolumeChanged_I (IntPtr jnienv, IntPtr native__this, int paramV)
		{
			global::Com.Iflytek.Speech.IVerifierListener __this = global::Java.Lang.Object.GetObject<global::Com.Iflytek.Speech.IVerifierListener> (native__this, JniHandleOwnership.DoNotTransfer);
			__this.OnVolumeChanged (paramV);
		}
#pragma warning restore 0169

		IntPtr id_onVolumeChanged_I;
		public void OnVolumeChanged (int paramV)
		{
			if (id_onVolumeChanged_I == IntPtr.Zero)
				id_onVolumeChanged_I = JNIEnv.GetMethodID (class_ref, "onVolumeChanged", "(I)V");
			JNIEnv.CallVoidMethod (Handle, id_onVolumeChanged_I, new JValue (paramV));
		}

	}

	public partial class EndEventArgs : global::System.EventArgs {

		public EndEventArgs (global::Com.Iflytek.Speech.VerifierResult p0, int p1)
		{
			this.p0 = p0;
			this.p1 = p1;
		}

		global::Com.Iflytek.Speech.VerifierResult p0;
		public global::Com.Iflytek.Speech.VerifierResult P0 {
			get { return p0; }
		}

		int p1;
		public int P1 {
			get { return p1; }
		}
	}

	public partial class RegisterEventArgs : global::System.EventArgs {

		public RegisterEventArgs (global::Com.Iflytek.Speech.VerifierResult p0)
		{
			this.p0 = p0;
		}

		global::Com.Iflytek.Speech.VerifierResult p0;
		public global::Com.Iflytek.Speech.VerifierResult P0 {
			get { return p0; }
		}
	}

	public partial class VVolumeChangedEventArgs : global::System.EventArgs {

		public VVolumeChangedEventArgs (int v)
		{
			this.paramV = v;
		}

		int paramV;
		public int ParamV {
			get { return paramV; }
		}
	}

	[global::Android.Runtime.Register ("mono/com/iflytek/speech/VerifierListenerImplementor")]
	internal sealed class IVerifierListenerImplementor : global::Java.Lang.Object, IVerifierListener {

		object sender;

		public IVerifierListenerImplementor (object sender)
			: base (global::Android.Runtime.JNIEnv.CreateInstance ("mono/com/iflytek/speech/VerifierListenerImplementor", "()V"), JniHandleOwnership.TransferLocalRef)
		{
			this.sender = sender;
		}

#pragma warning disable 0649
		public EventHandler OnBeginOfSpeechHandler;
#pragma warning restore 0649

		public void OnBeginOfSpeech ()
		{
			if (OnBeginOfSpeechHandler != null)
				OnBeginOfSpeechHandler (sender, new EventArgs ());
		}
#pragma warning disable 0649
		public EventHandler OnCancelHandler;
#pragma warning restore 0649

		public void OnCancel ()
		{
			if (OnCancelHandler != null)
				OnCancelHandler (sender, new EventArgs ());
		}
#pragma warning disable 0649
		public EventHandler<EndEventArgs> OnEndHandler;
#pragma warning restore 0649

		public void OnEnd (global::Com.Iflytek.Speech.VerifierResult p0, int p1)
		{
			if (OnEndHandler != null)
				OnEndHandler (sender, new EndEventArgs (p0, p1));
		}
#pragma warning disable 0649
		public EventHandler OnEndOfSpeechHandler;
#pragma warning restore 0649

		public void OnEndOfSpeech ()
		{
			if (OnEndOfSpeechHandler != null)
				OnEndOfSpeechHandler (sender, new EventArgs ());
		}
#pragma warning disable 0649
		public EventHandler<RegisterEventArgs> OnRegisterHandler;
#pragma warning restore 0649

		public void OnRegister (global::Com.Iflytek.Speech.VerifierResult p0)
		{
			if (OnRegisterHandler != null)
				OnRegisterHandler (sender, new RegisterEventArgs (p0));
		}
#pragma warning disable 0649
		public EventHandler<VVolumeChangedEventArgs> OnVolumeChangedHandler;
#pragma warning restore 0649

		public void OnVolumeChanged (int paramV)
		{
			if (OnVolumeChangedHandler != null)
				OnVolumeChangedHandler (sender, new VVolumeChangedEventArgs (paramV));
		}

		internal static bool __IsEmpty (IVerifierListenerImplementor value)
		{
			return value.OnBeginOfSpeechHandler == null && value.OnCancelHandler == null && value.OnEndHandler == null && value.OnEndOfSpeechHandler == null && value.OnRegisterHandler == null && value.OnVolumeChangedHandler == null;
		}
	}

}
